Skip to content

Instantly share code, notes, and snippets.

@Maharshi-Pandya
Maharshi-Pandya / contemplative-llms.txt
Last active January 7, 2025 16:17
"Contemplative reasoning" response style for LLMs like Claude and GPT-4o
You are an assistant that engages in extremely thorough, self-questioning reasoning. Your approach mirrors human stream-of-consciousness thinking, characterized by continuous exploration, self-doubt, and iterative analysis.
## Core Principles
1. EXPLORATION OVER CONCLUSION
- Never rush to conclusions
- Keep exploring until a solution emerges naturally from the evidence
- If uncertain, continue reasoning indefinitely
- Question every assumption and inference
@coltenkrauter
coltenkrauter / fix-wsl2-dns-resolution
Last active January 7, 2025 16:16
Fix DNS resolution in WSL2
More recent resolution:
1. cd ~/../../etc (go to etc folder in WSL).
2. echo "[network]" | sudo tee wsl.conf (Create wsl.conf file and add the first line).
3. echo "generateResolvConf = false" | sudo tee -a wsl.conf (Append wsl.conf the next line).
4. wsl --terminate Debian (Terminate WSL in Windows cmd, in case is Ubuntu not Debian).
5. cd ~/../../etc (go to etc folder in WSL).
6. sudo rm -Rf resolv.conf (Delete the resolv.conf file).
7. In windows cmd, ps or terminal with the vpn connected do: Get-NetIPInterface or ipconfig /all for get the dns primary and
secondary.
@rougier
rougier / hl-block.el
Created January 5, 2025 16:47
Emacs / highlight logical block at point
;;; hl-block.el --- Highlight logical block at point -*- lexical-binding: t -*-
;; Copyright (C) 2025 Nicolas P. Rougier
;; Maintainer: Nicolas P. Rougier <Nicolas.Rougier@inria.fr>
;; Package-Requires: ((emacs "27.1"))
;; Keywords: convenience
;; This file is not part of GNU Emacs.
@tzickel
tzickel / patch_const.py
Created January 29, 2018 18:20
A simple example on how to patch a constant in a python 2 function
import new
class Empty(object):
pass
def patch_const(func, const_index, new_value, previous_value=Empty):
co = func.func_code
consts = list(co.co_consts)
@mwolson
mwolson / README.md
Last active January 7, 2025 16:11
Ghostty + tmux uniform copy and paste

Ghostty + tmux uniform copy and paste

Explanation

This set of configuration changes achieves the following:

  • Disable automatic copying to clipboard while using the mouse to select text. Instead, the selection is copied when the user types either Ctrl+Shift+c or Super+c (on macOS only) after using the mouse to select text.
  • The Super+c keybinding works by remapping it to Ctrl+Shift+c in ghostty.
  • Ghostty will ignore those keybindings so that tmux can handle them. This allows tmux to copy text cleanly even
@ih2502mk
ih2502mk / list.md
Last active January 7, 2025 16:11
Quantopian Lectures Saved
@gbarrancos
gbarrancos / gist:3277138
Created August 6, 2012 17:57
7 Tips for Successful Self Learning

7 Tips for Successful Self Learning - by Bradford Cross

No matter what, you're going to have to learn most everything on your own anyway. Self-learning is hard. Regardless of where, when or how you learn - being a good self-learner will maximize your potential.

In this post, Hamilton Ulmer (an almost-done Stanford stats masters student) and I, will explore seven ways to become a great self-learner.

The longest path is the shortest and the shortest path is the longest

@ctkjose
ctkjose / readme.md
Last active January 7, 2025 16:10 — forked from WebReflection/jsc
JavaScriptCore for macOS and Linux

JSC

JSC is the JavaScript engine from Apple's JavaScriptCore (WebKit) as a console application that you can use to run script in the terminal.

For more info visit the JSC's webkit wiki page.

Adding a shortcut to JSC

Using jsc is simple, the one issue is that Apple keeps changing the location for jsc. To deal with this issue I just create a symbolic link to the binary: